package cn.juque.systemservice.api.dto.org;

import cn.juque.common.abstracts.AbstractRequestDTO;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author JUQUE
 * @version 1.0.0
 * <ul>
 *  <li>simple-generator</li>
 *  <li>机构信息</li>
 * </ul>
 * @date 2022-11-03 23:57:34
 **/
@Data
public class OrgInfoUpdateDTO extends AbstractRequestDTO {

    /**
     * 机构ID
     */
    @NotEmpty(message = "机构ID不能为空")
    @Size(message = "机构ID不能超过{max}个字符", max = 32)
    private String orgId;

    /**
     * 机构名称
     */
    @NotEmpty(message = "机构名称不能为空")
    @Size(message = "机构名称不能超过{max}个字符", max = 100)
    private String orgName;

    /**
     * 机构封面
     */
    @Size(message = "机构封面不能超过{max}个字符", max = 32)
    private String orgCover;

    /**
     * 二维码
     */
    @Size(message = "二维码不能超过{max}个字符", max = 32)
    private String qrCode;

    /**
     * 上级机构ID
     */
    @Size(message = "上级机构ID不能超过{max}个字符", max = 32)
    private String parentOrgId;

    /**
     * 排序号
     */
    @NotNull(message = "排序号不能为空")
    @Range(min = 0, max = 9999, message = "排序号必须在{min}-{max}之间")
    private Integer sortNo;

    /**
     * 地址
     */
    @Size(message = "地址不能超过{max}个字符", max = 100)
    private String addr;

    /**
     * 联系人
     */
    @Size(message = "联系人不能超过{max}个字符", max = 30)
    private String linkman;

    /**
     * 联系电话
     */
    @Size(message = "联系电话不能超过{max}个字符", max = 30)
    private String linktel;

    /**
     * 备注
     */
    @Size(message = "备注不能超过{max}个字符", max = 400)
    private String remark;

}
